package com.unicomcz.query;

import java.sql.ResultSet;
import java.util.List;

import com.unicomcz.DetailPageAction;

public class TagQueryAction extends DetailPageAction
{
    private String tagNumber;
    
    /**
     * @return the tagNumber
     */
    public String getTagNumber()
    {
        return tagNumber;
    }
    /**
     * @param tagNumber the tagNumber to set
     */
    public void setTagNumber(String tagNumber)
    {
        this.tagNumber = tagNumber;
    }
    public String getSqlStr()
    {
        String sql = " select brand,mob_type,tag,yc,zc from dls_tag_number where tag=?";
         return sql;
    }
    public Object[] getParams() {
        return new Object[]{tagNumber};
    }
    protected void regQueryParam() throws Exception{     
        log.info(tagNumber);
        pstmt.setString(1, tagNumber);
    }
    protected void rs2List(ResultSet rs,List out) throws Exception{
        TagBean t = new TagBean();
        t.setBrand(rs.getString(1));
        t.setMobType(rs.getString(2));
        t.setTagNumber(rs.getString(3));
        t.setYc(rs.getString(4));
        t.setYf(rs.getString(5));
        out.add(t);
    }

}
